www.mxdraw.com
内容索引主面
前一个向上下一个
IMxDrawBlockTableRecord::AddDimRadial 方法

增加一个半径标注

IDL
[helpstring("method AddDimRadial")]
HRESULT AddDimRadial([in] DOUBLE dCenterX, [in] DOUBLE dCenterY, [in] DOUBLE dChordPointX, [in] DOUBLE dChordPointY, [in] DOUBLE leaderLength, [out,retval] IMxDrawDimRadial** ppNewObj);
参数 
说明 
[in] DOUBLE leaderLength 
输入箭头长度 
center 
被标注的曲线的中点 
chordPoint 
被标注的曲线上的点 

返回新增加的标注对象

例如: 绘制标注 c#代码.

        private MxDrawDimRadial DrawDimRadial(MxDrawPoint center, MxDrawPoint chordPoint, double leaderLength)
        {
            MxDrawApplication mxapp = new MxDrawApplication();
            MxDrawDatabase mxdb = mxapp.WorkingDatabase();
            MxDrawBlockTableRecord btr = mxdb.CurrentSpace();

            ////////////////////////////////////
            double r = center.DistanceTo(chordPoint);
            btr.AddCircle(center.x, center.y, r);
   

            MxDrawVector3d vec = center.SumVector(chordPoint);

            MxDrawPoint txtpos = new MxDrawPoint();
            txtpos.x = center.x;
            txtpos.y = center.y;

            vec.Normalize();
            vec.Mult(0.1);

            txtpos.Sum(vec);

            MxDrawDimRadial ent = btr.AddDimRadial(center.x, center.y, chordPoint.x, chordPoint.y, leaderLength);
            ent.colorIndex = MCAD_COLOR.mcRed;
            ent.TextPosition = txtpos;
     


            ent.RecomputeDimBlock(true);
            btr.Close();
            return ent;
        }
Copyright (c) 2010. All rights reserved.
你认为该帮助怎么样? 发送反馈信息!